<include file="Public/header"/>
<div class="row">
  <div class="col-md-12">
    <div class="ibox float-e-margins">
      <div class="ibox-title">
        <h5>商户组</h5>
        <div class="row">
          <div class="col-sm-2 pull-right">
            <a href="javascript:menu_add('添加公司','/manage_StatManage_addCompany.html',540,320);" class="layui-btn layui-btn-small">添加公司</a>
          </div>
        </div>
      </div>
        <div class="list item">
          <!--交易列表-->
          <table class="layui-table" lay-data="{width:'100%',limit:<{$rows}>,id:'userData'}">
            <thead>
            <tr>
              <th lay-data="{field:'ddlx', width:130}">ID</th>
                <th lay-data="{field:'memberid', width:160}">公司名称</th>
                <th lay-data="{field:'out_trade_id', width:160,style:'color:#060;'}">子商户</th>
                <th lay-data="{field:'rate', width:160}">总入账</th>
                <th lay-data="{field:'yue', width:160}">总余额</th>
                <th lay-data="{field:'actualamount', width:160,style:'color:#C00;'}">可提余额</th>
                <th lay-data="{field:'pay_status',width:80}">查看</th>
                <th lay-data="{field:'caozuo',width:80}">操作</th>
            </tr>
            </thead>
            <tbody>
              <volist name="companylist" id="vo">
                <tr>
                  <td><{$vo['id']}></td>
                  <td style="text-align:center;"><{$vo['company_name']}></td>
                  <td style="text-align:center; color:#090;"><{$vo['kid_id']}></td>
                  <td style="text-align:center; color:#666"><{$vo['amount']}></td>
                  <td style="text-align:center; color:#666"><{$vo['yue']}></td>
                  <td style="text-align:center; color:#666"><{$vo['dong']}></td>
                  <td>
                    <a href="javascript:order_view('<{$vo["company_name"]}>','<{:U('Admin/StatManage/show',['id'=>$vo['id']])}>',1000,700)">查看</a>
                  </td>
                  <td>
                    <a href="javascript:order_view('<{$vo["company_name"]}>','<{:U('Admin/StatManage/editCompany',['id'=>$vo['id']])}>',600,450)">编辑</a>
                  </td>
                </tr>
              </volist>
            </tbody>
          </table>
          <!--交易列表-->
          <div class="page">
            <{$page}>
          </div>
        </div>
      </div>
    </div>

  </div>
  <include file="Public/footer"/>
  <script src="/Public/Front/js/echarts.common.min.js"></script>
  <script>
      //添加公司
      function menu_add(title,url,w,h){
          x_admin_show(title,url,w,h);
      }

      layui.use(['laydate', 'laypage', 'layer', 'table', 'form'], function() {
          var laydate = layui.laydate //日期
              , laypage = layui.laypage //分页
              ,layer = layui.layer //弹层
              ,form = layui.form //表单
              , table = layui.table; //表格
          //日期时间范围
          laydate.render({
              elem: '#createtime'
              , type: 'datetime'
              ,theme: 'molv'
              , range: '|'
          });
          //日期时间范围
          laydate.render({
              elem: '#successtime'
              , type: 'datetime'
              ,theme: 'molv'
              , range: '|'
          });
      });
      /*订单-查看*/
      function order_view(title,url,w,h){
          x_admin_show(title,url,w,h);
      }
      $('#export').on('click',function(){
          var time = "<{$applyTTime}>"; //导出订单的时间段不能大于一个星期
          if (time <= 0){
              layer.alert('请选择"提交时间段"，点击搜索，再导出，只能导出一个星期内的订单');
              return;
          }
          if(time > 7*24*60*60) {
              layer.alert('请选择"提交时间段"，点击搜索，再导出，只能导出一个星期内的订单');
              return;
          }
          window.location.href
              = "<{:U('Admin/Order/exportorder').'?memberid='.$_GET[memberid].'&orderid='.$_GET[orderid].'&createtime='.$_GET[createtime].'&successtime='.$_GET[successtime].'&tongdao='.$_GET[tongdao].'&bank='.$_GET[bank].'&status='.$_GET[status].'&ddlx='.$_GET[ddlx]}>";
      });
  </script>
  </body>
  </html>